package com.demo.manager.controller;

import com.demo.manager.pojo.User;
import com.demo.manager.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

/**
 * @BelongsProject: manager
 * @BelongsPackage: com.demo.manager.controller
 * @Author: LiuJiayin
 * @Date: 2021/3/24 13:51
 * @Description: TODO
 */
@Controller
public class LoginController {
    @Autowired
    UserService userService;

    @GetMapping(value = {"/", "/login"})
    public String loginPage() {
        return "login";
    }

    @PostMapping(value = "/checkin")
    public String checkIn(String username, String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {
        return "";
    }

    @RequestMapping("/index.html")
    public String indexPage() {

        return "index";
    }

}
